import request from '../../../../../public/js/common/api/api.js';

const AuditUrl = Utils.CurDomain.AuditUrl;

/**
 * @file生物安全审计API
 */
export default class AuditAPI {
    // 获取审计表列表
    static auditFormBills (data) {
        let { search, pageIndex, pageSize, type } = data;
        return request.post(`${AuditUrl}/auditformbills/p/list`, data);
    }

    //查询详情
    static getAuditFormBills (id) {
        return request.get(`${AuditUrl}/auditformbills/${id}`);
    }
    // 提交整改反馈
    static submitRectify (data) {
        return request.post(`${AuditUrl}/auditformbills/track`, data);
    }

    /**
     * 获取员工信息
     * @param data
     * @returns 
     */
    static getPersonList() {
        return request.get(`${Utils.CurDomain.EmployeeMgtUrl}/emplrecds/by/q?Status=true`);
    }

    /**
     * 获取审查项列表
     * @param 
     * @returns 
     */
    static getAuditItemsList(data) {
        return request.post(`${AuditUrl}/audititems/p`, data);
    }

    /**
     * 新增审查表
     * @param data
     * @returns 
     */
    static setAuditTables(data) {
        return request.post(`${AuditUrl}/auditformbills`, data);
    }
    /**
     * 删除审查表
     * @param id
     * @returns 
     */
    static deleteAuditTables(id) {
        return request.delete(`${AuditUrl}/auditformbills/${id}`);
    }
    /**
     * 修改审查表
     * @param data
     * @returns 
     */
    static updateAuditTables(id,data) {
        return request.put(`${AuditUrl}/auditformbills/${id}`, data);
    }

    /**
     * 获取审查表详情
     * @param id
     * @returns 
     */
    static getAuditTablesDetail(id) {
        return request.get(`${AuditUrl}/auditformbills/${id}`);
    }

    /**
     * 获取服务部信息
     * @param data
     * @returns 
     */
    static queryBaseOrgunitList() {
        return request.get(`${Utils.CurDomain.AuthUrl}/accounts/orgs`);
    }

    //获取系统参数 获取猪厂
    static getSubdata(id) {
        return request.get(`${Utils.CurDomain.SubDataUrl}/prmtsettings/${id}/value`);
    }


}